== !LogIn ==
[[PageOutline(3-4, Sections)]]
=== Intro ===
login given user, set interface language and initiate session
=== Description ===
'''struct !LogIn(string $username, string $password, string $language, string $useragent)'''
Login user ''username'' identified by password ''password'' communicating in language ''language'' and working in client application ''useragent''.
This function should be always called when starting communication with OSDb server to identify user, specify application and start a new session (either registered user or anonymous).
If user has no account, blank username and password should be used.
=== Parameters ===
''username''::
nickname of user that's trying to login,
can be left blank if logging in anonymously
''password''::
user's password to verify identity,
can be left blank if logging in anonymously
''language''::
[http://en.wikipedia.org/wiki/List_of_ISO_639-2_codes ISO639] 2-letter language code to specify the language all subsequent communication should use (mainly for error messages).
''useragent (required)''::
identifier of application/useragent that is trying to execute this operation,
must be specified, empty parameter is not allowed
=== Return Values ===
Output is returned in this structure:
{{{
struct(
(string) [token],
(string) [status],
(double) [seconds]
)
}}}
and contains these elements:
''token''::
token string/session id, must be used in subsequent communication
''status''::
function result code, see [wiki:XmlRpcStatusCode list of status codes]
''seconds''::
time taken to execute this command on server
=== Implementations ===
[wiki:XmlRpcLogInImpl#delphi Delphi]
=== Changelog ===
Version 1: created this function
=== Examples ===
==== Input ====
{{{
#!xml
LogIn
eduo
******
en
SolEol 0.0.8
}}}
==== Output ====
{{{
#!xml
token
j5dkms7al7vivnrvaflbpf6634
status
200 OK
seconds
0.035
}}}
=== Notes ===
none yet
=== See also ===
* [wiki:XmlRpcLogOut LogOut]
* [wiki:XmlRpcNoOperation NoOperation]
=== Comments ===
add your comments, hints and suggestion here if you like ...
[Prev] [wiki:XmlRpcIntro Home] [wiki:XmlRpcLogOut Next]